package com.example.administrator.testxingpiao.ui.perfom;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.administrator.testxingpiao.R;
import com.example.administrator.testxingpiao.bean.GoodsListBean;

import java.util.List;

/**
 * Created by Administrator on 2016/8/6.
 */
public class PerformAdapter extends BaseQuickAdapter<GoodsListBean>{


    public PerformAdapter(int layoutResId, List<GoodsListBean> goodsListBeen) {
        super(R.layout.list_item_perform, goodsListBeen);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, GoodsListBean goodsListBean) {
        baseViewHolder.setText(R.id.tv_title,goodsListBean.getGoodsName())
                .setText(R.id.rmb,"¥"+goodsListBean.getGoodsPrice())
                .setText(R.id.tv_selsum,"销量"+goodsListBean.getGoodsSalenum());
        Glide.with(mContext).load(goodsListBean.getGoodsImageUrl()).crossFade().into((ImageView) baseViewHolder.getView(R.id.image_perform));
    }


}

